﻿#ifndef MAINWINDOWTEST_H
#define MAINWINDOWTEST_H

#include <QMainWindow>
#include "mousehook.h"
#include <QSystemTrayIcon>

namespace Ui {
class MainWindowTest;
}

class MainWindowTest : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindowTest(QWidget *parent = 0);
    void init();
    ~MainWindowTest();
    HWND desktopWnd;//桌面句柄

    void handle();
    void saveFile();


private:
    Ui::MainWindowTest *ui;
    int lineNum;
    MouseHook mHook;//钩子类
    QString tempData;
    QString name;


signals:
    void press(QPoint p);

protected:
    bool event(QEvent *event);
    bool nativeEvent(const QByteArray &eventType, void *message, long *result);//获取本地事件
    void closeEvent(QCloseEvent *event);
};

#endif // MAINWINDOWTEST_H
